/*
	File:				Enemy.Cpp
	Course:		SGP 1208
	Author:		Kori Po
	Purpose:	Enemy object class
*/

#include "Enemy.h"
#include	"Game.h"

#include "../SGD Wrappers/CSGD_DirectInput.h"
#include "../SGD Wrappers/CSGD_XAudio2.h"
#include "../SGD Wrappers/CSGD_TextureManager.h"
#include "../SGD Wrappers/SGD_Math.h"


CEnemy::CEnemy(void)
{
	// Type Def
	CEntity::m_nType = OBJ_ENEMY;

	// Entry Assignment
	m_nHP = 100;
	m_nDefense = 0;
	m_nAtkPower = 20;
	m_fAtkSpeed = 1.00f;
	m_nAP = 0;
	m_fCDR = 0;
	m_fMovement = 100;

	// Wrapper Alloc
	m_InputGuy				= CSGD_DirectInput::GetInstance();
	m_AudioGuy				= CSGD_XAudio2::GetInstance();
	m_TextureGuy			= CSGD_TextureManager::GetInstance();

	// Asset Alloc
	CEntity::SetImageID(m_TextureGuy->LoadTexture(_T("Resource/TestEnemy.png")));
}


CEnemy::~CEnemy(void)
{
	/* Do Nothing */
}


void CEnemy::Update(float pElapsedTime)
{

}

void CEnemy::Render(void)
{
	int ToDrawX = int(GetX()) - int(GetWidth()/2);
	int ToDrawY = int(GetY()) - int(GetHeight()/2);

	RECT ToDraw = {0,0,88,88};
	m_TextureGuy->Draw( (CEntity::GetImageID()), ToDrawX, ToDrawY, 1.0f, 1.0f );
}